#include "Driver/defines.h"
#include "Driver/system.h"
#include "Driver/display.h"
#include "Driver/image.h"
#include "Driver/cal.h"
#include "Driver/GT22.h"
#include "Driver/handl_nw.h" 
#include "Driver/hal_ucs.h"
#include "Driver/mystring.h"
#include "Driver/CC2500.h"
#include "Driver/rtc.h"
#include "wdt.h"
#include "time.h"
#include "delay.h"
#include <stdio.h>
#include <string.h>

//#define UART_DEBUG
#define LED_DEBUG

#ifdef LED_DEBUG
	#include "Driver/led.h" 
#endif

#ifdef UART_DEBUG
	#include "Driver/uart.h"
#endif

#ifdef LED_DEBUG
	#define LED1_RESET() LED1_reset()
	#define LED2_RESET() LED2_reset()
	#define LED1_TOGGLE() LED1_toggle()
	#define LED2_TOGGLE() LED2_toggle()
	#define LED1_SET() LED1_set()
	#define LED2_SET() LED2_set()
#else	
	#define LED1_RESET()
	#define LED2_RESET() 
	#define LED1_TOGGLE()
	#define LED2_TOGGLE() 
	#define LED1_SET() 
	#define LED2_SET()
#endif

#ifdef UART_DEBUG
	#define	PRINTF(fmt,args...)	printf (fmt ,##args)
	#define PRINT_CHAR(x) print_char(x) 
	#define PRINT_RF(x, length) print_rf(x, length)
#else
	#define PRINTF(fmt,args...)
	#define PRINT_CHAR(x)
	#define PRINT_RF(x, length)
#endif

typedef enum {LPM4_MODE, LPM3_MODE, ACTIVE_MODE, APPLICATION_MODE} McuStatus;
#define no_operation()                          __no_operation												
#define enable_glob_isr() 						_BIS_SR(GIE);
#define disable_glob_isr() 						_BIC_SR(GIE);